<?php
$auth_type = 0;
if(isset($_GET['logout']))
{
    setcookie("uid","");
}
if(!isset($_COOKIE['uid'])
    && $_COOKIE['uid'] != 'piupiulalalapuffpuffbla'
    )
{
    if(isset($_POST['pass']) && $_POST['pass'] == 'Katary1987')
    {
        ob_end_clean();
        setcookie("uid","piupiulalalapuffpuffbla");
        $_COOKIE['uid'] = "piupiulalalapuffpuffbla";
        ob_flush();
    }
    else
    {
        print "<form method=post><input name=pass type=password /> <input type=submit></form>";
        die('');
    }
}
if($_COOKIE['uid'] == 'piupiulalalapuffpuffbla') $auth_type = 1; // админ
ob_start();
?>
